May 2010
1 post
Floating point and mipmapping and filtering -... →
“Are Values Clamped from 0.0 to 1.0? - No, you can use the full range supported. GL_RGBA32F_ARB, GL_RGB32F_ARB, GL_ALPHA32F_ARB, GL_INTENSITY32F_ARB, GL_LUMINANCE32F_ARB, GL_LUMINANCE_ALPHA32F_ARB for 32 bit floats.
GL_RGBA16F_ARB, GL_RGB16F_ARB, GL_ALPHA16F_ARB, GL_INTENSITY16F_ARB, GL_LUMINANCE16F_ARB, GL_LUMINANCE_ALPHA16F_ARB for 16 bit floats.”
April 2010
5 posts
The case of the 500-mile email →
So time to connect to a lightly-loaded remote host on a nearby network would actually largely be governed by the speed of light distance to the destination rather than by incidental router delays.
via http://www.reddit.com/r/programming/comments/bvzhq/the_case_of_the_500mile_email/
Mac OS X OpenGL Info →
version info etc.
[pdf] opengl official cheat sheet by khronos group →
virtualenv →
virtualenv is a successor to workingenv, and an extension of virtual-python.
March 2010
3 posts
Top Ten One-Liners from CommandLineFu Explained →
Wooji Juice: PyObjC in Snow Leopard →
Secondly, instance variables: In PyObjC, an object’s instance variables are not visible to Objective C unless you explicitly declare them, like so: pythoninstance variables example class
MySecondExampleClass(NSObject): counter = 0 counterEnabled = objc.ivar()
Installing PyObjC XCode templates in Snow Leopard... →
glad pyobjc is still alive
February 2010
8 posts
main() の前に関数を呼ぶ - bkブログ →
__attribute__((constructor))
ChucK => Strongly-timed, On-the-fly Audio... →
Arduino playground - Resources →
found useful to find local electronics shops in europe
Getting the Apple Bluetooth Keyboard (Late 2009)... →
javascript: js_compile.py
compile main.original.js into main.js with google closure javascript compiler.
#!/usr/bin/python
import httplib, urllib, sys, os
curdir = os.path.abspath(os.path.split(__file__)[0])
fp = open(os.path.join(curdir, 'main.original.js'), 'r')
data = fp.read()
params = urllib.urlencode([
('js_code', data),
('compilation_level', 'ADVANCED_OPTIMIZATIONS'),
('output_format', 'text'),
...
CUIベースなのに無駄にビジュアルなPython用デバッガ - pudb →
Designers Toolbox: Web Safe Area →
osascript -e "set volume 10"
ref: AppleScript 2.1 Help: ターミナルのコマンドラインから AppleScript スクリプトを実行する
January 2010
8 posts
ssh-copy-id (by hand)
# once
$ ssh-keygen
# for each client
$ ssh username@hostname.local "mkdir ~/.ssh" $ cat ~/.ssh/id_rsa.pub | ssh username@hostname.local "cat>~/.ssh/authorized_keys"
# file copy $ scp -r some_folder user@hostname.local:Desktop
via: http://d.hatena.ne.jp/lurker/20061219/1166457414 http://d.hatena.ne.jp/egyo2nd/20070831/1188521741 http://d.hatena.ne.jp/midori_kasugano/20091203/1259838485
CoreAnimation: ‘blur’ problem with setTransform: CATransformIndetity on snow leopard, solved by issuing setNeedsLayout afterwards.
SATソルバを使うためにCNFを作る →
Shader Toy →
WebGL required
An open source Flash™ runtime written in pure... →
InAppSettingsKit - Put settings in your iPhone... →
Cocoa with Love: What is a meta-class in... →
The following code creates a new subclass of NSError at runtime and adds one method to it:
Class newClass = objc_allocateClassPair([NSError class], “RuntimeErrorSubclass”, 0); class_addMethod(newClass, @selector(report), (IMP)ReportFunction, “v@:”); objc_registerClassPair(newClass);
November 2009
5 posts
Zen Coding: A Speedy Way To Write HTML/CSS Code -... →
[mac] ClipMenu: A clipboard manager /... →
A clipboard manager for Mac OS X
フリーソフト。カタマリのT氏経由で。恐ろしく作業効率が上がりそう。オプションの数がメイド・イン・ジャパンを物語る。
GoogleやRob PikeやKen Thompsonのネームバリューのおかげで、...
– via Matzにっき(2009-11-13)
そやなー、と。美しくないけど使ってる人が多くていつの間にかスタンダードになっちゃった的な物なんて山ほどあるし。発明がポピュラーになるかどうかって色々な要因があり、そこがもどかしく且つ人間的で面白い。
Start - Bottle Web Framework →
Bottle is a fast and simple WSGI-framework for the Python Programming Language.
October 2009
28 posts
[pdf][cheatsheet] GLSL quick reference →
開発者の皆さんライブラリ病が過ぎるんじゃないすかね。脳味噌がライブラリ化されちゃってない?
– nisshi.yugop » Blog Archive » wonderwall
[opengl][failure] dont glEnable GL_TEXTURE_2D...
i dont think its the first time that im troubled by this. just on pyopengl or general?
1+1 = 2 を「証明」してみる。C++ で。
– d.y.d.
AIMA Python file: utils.py →
via reddit
def Dict(**entries):
"""Create a dict out of the argument=value arguments.
>>> Dict(a=1, b=2, c=3)
{'a': 1, 'c': 3, 'b': 2}
"""
return entries
class DefaultDict(dict):
"""Dictionary with a default value for unknown keys."""
def __init__(self, default):
self.default = default
def __getitem__(self, key):
if key in self: return...
[pyopengl] vbo
to use VBO with pyopengl, set ‘None’ as the pointer arg for glVertexPointer, not 0.
vboを使う時、pyeopeglではglVertexPointerのポインタにNoneを指定する。 0 ではない。
as for: pyeopegl 3.0a
ref: Prototyping OpenGL applications with PyOpenGL - Siafoo
おまけ:
glBufferSubData(GL_ARRAY_BUFFER, 0, the_vertex.dtype.itemsize * 2 * the_n_vertex, ADT.voidDataPointer(the_vertex))
[mac/opengl] vbo updating
gl_feedback apparently NOT available
options are:
fbo > pbo > vbo
opencl
glbuffersubdata
fbo > vbo (vertex texture fetch)
* as for 10.6
UPDATE:
vertex texture fetch is available on macbook early 2009, the number of texture units is 16.
GLint MaxVertexTextureImageUnits = 0;
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &MaxVertexTextureImageUnits);
...
[text] A Farewell to ORMs →
i agree. similar to any xxxx (ex. OpenGL) framework. bare-born is stronger in 90% situations.
[web] Setting Up Photoshop For Web, App and iPhone... →
illustrator too.
[ja/howto] スクラム開発 →
SequenceL - declarative computation on nonscalars →
これはまた変態言語。Nasaも使ってるらしい。
Yet another programming language, that NASA is using.
tutorial: http://www.cs.ttu.edu/~dcooke/tutorial2-1accepted.pdf
[software] yEd - Graph Editor →
java
[numpy] rotate vertices at once
import numpy as np
rot_matrix = np.array([[np.cos(np.pi/4), -np.sin(np.pi/4)],
[np.sin(np.pi/4), np.cos(np.pi/4)]])
the_buffer.shape = (n, 2)
the_vertex[:] = np.dot(the_buffer, rot_matrix)
行列を後ろからかけると上手くいくよ。
@font-face in Depth →
Font Squirrel’s @font-face page, which include @font-face kits that include an .eot as well as an .otf or .ttf font. Each kit also includes a stylesheet which can be linked directly into your document so you can use the font with minimal coding.
Smashing Magazine’s has an excellent article, 40+ Excellent Freefonts For Professional Design
Kernest.com hosts a whole slew of fonts that can be used...
python termination callback
import atexit
@atexit.register
def quit():
# do clean up #
ref: How to run one last function before getting killed in Python? - Stack Overflow
* desnt work with python gui on os x 10.5